<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="${pageContext.request.contextPath }/bootstrapStyle/img/favicon.ico">
<link href="${pageContext.request.contextPath }/bootstrapStyle/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
<link href="${pageContext.request.contextPath }/bootstrapStyle/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="${pageContext.request.contextPath }/bootstrapStyle/css/animate.min.css" rel="stylesheet">
<link href="${pageContext.request.contextPath }/bootstrapStyle/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/bootstrapStyle/css/fileinput.css" rel="stylesheet">
<link href="${pageContext.request.contextPath }/bootstrapStyle/css/style.min.css?v=4.0.0" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/bootstrap/css/jquery-confirm.css"/>
<script src="${pageContext.request.contextPath}/bootstrapStyle/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/bootstrapStyle/js/fileinput.js"></script>
<script src="${pageContext.request.contextPath}/bootstrapStyle/js/content.min.js?v=1.0.0"></script>
<script src="${pageContext.request.contextPath}/bootstrapStyle/js/bootstrap.min.js?v=3.3.5"></script>
<script src="${pageContext.request.contextPath}/bootstrapStyle/js/zh.js"></script>
<script src="${pageContext.request.contextPath }/bootstrapStyle/js/jquery-confirm.js"></script>
<script src="${pageContext.request.contextPath }/bootstrapStyle/js/plugins/peity/jquery.peity.min.js"></script>
<script src="${pageContext.request.contextPath }/bootstrapStyle/js/plugins/fancybox/jquery.fancybox.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=2d12993ce41407db4050140fe342d9ba"></script>

<title>完善医院信息</title>
</head>
<body class="gray-bg top-navigation">
	
    <div id="wrapper">
        <div id="page-wrapper" class="gray-bg">
            <div class="row border-bottom navy-bg">
                <nav class="navbar navbar-static-top" role="navigation" style="height:80px;">
                    <div class="navbar-header">
                        <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button" >
                            <i class="fa fa-reorder"></i>
                        </button>
                        <a href="#" class="navbar-brand"><i class="fa fa-reorder"></i>  速递医运-我要入驻</a>
                    </div>
                    <!-- <div class="navbar-collapse collapse" id="navbar">
                        <ul class="nav navbar-top-links navbar-right">
                            <li>
                                <a href="#">
                                    <i class="fa fa-user"></i>  LTT-AH-ZY
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="fa fa-sign-out"></i> 退出
                                </a>
                            </li>
                        </ul>
                    </div> -->
                    
                </nav>
            </div>
            <c:if test="${info=='success' }">
            	<div class="alert alert-success"><H3>${msg }</H3></div>
            </c:if>
            <c:if test="${info=='error' }">
            	<div class="alert alert-danger"><H3>${msg }</H3></div>
            </c:if>
            <c:if test="${info=='warning' }">
            	<div class="alert alert-warning"><H3>${msg }</H3></div>
            </c:if>
            <c:if test="${hosplogininfo!=null }">
            	<div class="alert alert-info"><H3>当前账户审核状态为&nbsp;<a id="SHZTZ">${hosplogininfo.hosplogintypename}</a></H3></div>
            </c:if>
            <div class="wrapper wrapper-content">
	        	<div class="container white-bg">
		        	<div class="row">
			        	<div class="col-sm-12">
                			<div class="ibox">
                    			<div class="ibox-title">
                        			<h5>填写详细信息</h5>
                    			</div>
                    			<div class="ibox-content">
                    				<form class="form-horizontal m-t" id="form" action="${pageContext.request.contextPath}/Main/NoneRegisterMain/myhospinforegSubmit.action" method="post"  enctype="multipart/form-data">
										<div class="row">
											<div class="col-sm-12">
												<div class="row">
													<div class="col-sm-5">
														<div class="form-group">
							                                <label>医院名称*</label>
							                                <input type="text" minlength="2" name="hospname" id="hospname" class="form-control" placeholder="请输入医院全称"  aria-required="true" value="${hospinfo.hospname}" required="true">
							                            </div>
							                            <div class="form-group draggable">
							                                <label>医院联系电话*</label>
							                                <input type="text" name="hospphone" id="hospphone" class="form-control" placeholder="请输入医院联系电话（保证畅通，座机、移动电话不限）" value="${hospinfo.hospphone}"  aria-required="true" required="true">
							                            </div>
							                            <div class="form-group draggable">
							                                <label>注册人身份证号码*</label>
							                                <input type="text" name="hospregidcard" minlength="18" maxlength="18" id="hospregidcard" value="${hospinfo.hospregidcard}" class="form-control" placeholder="请输入平台注册人本人的身份证号码，注意格式"  aria-required="true" required="true">
							                            </div>
							                            <div class="form-group draggable">
							                            	<!-- <a class="btn btn-primary" >选择医院地址</a> -->
											                <br/>
											                <!-- 经度 -->
											                <input type="hidden" class="form-control" id="lng1" name="lng" value="${hospinfo.hospadrlon}" aria-required="true" required="true"/>
											                <!-- 纬度 -->
											                <input type="hidden" class="form-control" id="lat1" name="lat" value="${hospinfo.hospadrlat}" aria-required="true" required="true"/>
											                <!-- 省 -->
											                <input type="hidden" class="form-control" id="province1" name="province" value="${hospinfo.hospadrprovince}" aria-required="true" required="true"/>
											                <!-- 市 -->
											                <input type="hidden" class="form-control" id="city1" name="city" value="${hospinfo.hospadrcity}" aria-required="true" required="true"/>
											                <!-- 区 -->
											                <input type="hidden" class="form-control" id="area1" name="area" value="${hospinfo.hospadrarea}" aria-required="true" required="true"/>
											                <!-- 街 -->
											                <input type="hidden" class="form-control" id="other1" name="other" value="${hospinfo.hospadrother}" aria-required="true" required="true"/>
															<input type="text" id="map" class="form-control" name="hospadr" value="${hospinfo.hospadrprovince}${hospinfo.hospadrcity}${hospinfo.hospadrarea}${hospinfo.hospadrother}" placeholder="请选择医院的详细地址，写入经纬度（用地图点击选择）" aria-required="true" aria-hidden="true">
															<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
																<div class="modal-dialog" style="width: 1000px;height:800px;">
																	<div class="modal-content">
																		<div class="modal-header">
																			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
																			<h4 class="modal-title" id="myModalLabel"><a>百度地图选点(鼠标滑动放大缩小地图,左击拖动移动地图。点击获取经纬度)</a></h4>
																		</div>
																		<div class="modal-body" id="map_main" style="height:500px;">地图容器</div>
																		<div class="modal-footer">
																			<input style="width:300px;float:left;" type="text" placeholder="左击地点，生成经纬度" value="" id="map_txt" class="form-control" readonly=""/>
																			<!-- 经度 -->
															                <input type="hidden" id="lng"/>
															                <!-- 纬度 -->
															                <input type="hidden" id="lat"/>
															                <!-- 省 -->
															                <input type="hidden" id="province"/>
															                <!-- 市 -->
															                <input type="hidden" id="city"/>
															                <!-- 区 -->
															                <input type="hidden" id="area"/>
															                <!-- 街 -->
															                <input type="hidden" id="other"/>
																			<button type="button" class="btn btn-primary" onclick="setMapValue()" data-dismiss="modal">设置为此地址</button>
																			<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
																		</div>
																	</div>
																</div>
															</div>
							                            </div>
							                            <div class="form-group draggable">
							                                <label>医院等级*</label>
							                                <!-- <input type="text" name="hospgrade" id="hospgrade" class="form-control" placeholder="请输入医院认证过的等级，如：二级甲等医院" required="" aria-required="true"> -->
							                            	<select class="form-control" name="hosplevel" id="hosplevel" required="" aria-required="true" required="true">
							                            		<option value="">------请选择------</option>
								                            	<c:forEach items="${hosplevelList }" var="hosplevel">
								                            		<c:if test="${hospinfo.hospgrade==hosplevel.hosplevelname}">
								                            			<option value="${hosplevel.hosplevelname }" selected="selected">${hosplevel.hosplevelname }</option>
								                            		</c:if>
								                            		<c:if test="${hospinfo.hospgrade!=hosplevel.hosplevelname}">
								                            			<option value="${hosplevel.hosplevelname }">${hosplevel.hosplevelname }</option>
								                            		</c:if>
								                            	</c:forEach>
						                                    </select>
							                            </div>
													</div>
													<div class="col-sm-1">
													</div>
													<div class="col-sm-6">
														
							                            <div class="form-group draggable">
							                                <label>医院建院简介*</label>
							                                <textarea id="hospabs" rows="6" minlength="20" maxlength="150" name="hospabs" class="form-control" placeholder="请输入医院建院简介，可写简要梗概（可参考贵院官网信息），字数限20-150字"  aria-required="true" required="true">${hospinfo.hospabs }</textarea>
							                            </div>
							                            <div class="form-group draggable">
							                                <label>医院特色简介*</label>
							                                <textarea id="hospfeature" rows="7" minlength="20" maxlength="150" name="hospfeature" class="form-control" placeholder="请输入医院特色，例如特色医生或部门，为了实现更好的交互，请认真填写（填写内容作为别人首先了解贵院的基本资料）字数限20-150字"  aria-required="true" required="true">${hospinfo.hospfeature }</textarea>
							                            </div>
													</div>
												</div>
												<!-- 这里是地图模式，选择地点 -->
					                			
												<br/><br/>
												<br/><br/>
												<div class="row">
													<div class="col-sm-12">
														<div class="panel panel-default">
						                                    <div class="panel-heading">
						                                        <h5 class="panel-title">
						                                        	<a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseOne">已上传的注册人医师资格证照片*</a>
						                                    	</h5>
						                                    </div>
						                                    <div id="" class="panel-collapse collapse in">
						                                        <div class="panel-body">
						                                            <c:if test="${hospinfo.hospregdocquacer0!=''}">
																		<a class="fancybox" href="${hospinfo.hospregdocquacer0}" title="图片1">
											                            <img alt="image" src="${hospinfo.hospregdocquacer0}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
																	<c:if test="${hospinfo.hospregdocquacer1!=''}">
												                        <a class="fancybox" href="${hospinfo.hospregdocquacer1}" title="图片2">
												                            <img alt="image" src="${hospinfo.hospregdocquacer1}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
						                                        </div>
						                                    </div>
						                                </div>
														<c:if test="${hosplogininfo.hosplogintype==1 }">
															<div class="form-group draggable" id="certify_pic1">
								                                <label>注册人医师资格证照片*<a><abbr title="注意事项">（注册人所持有的行医资格证，上次保证资格证号清晰可辨认，模糊可能导致审核不通过！只支持上传一张，不可多选！）</abbr></a></label>
								                                <input name="certify_pic" id="hospregdocquacer" class="file form-control" type="file" multiple=true data-min-file-count="1" data-max-file-count="2" aria-required="true">
								                            </div>
							                            </c:if>
													</div>
													<div class="col-sm-12">
														<div class="panel panel-default">
						                                    <div class="panel-heading">
						                                        <h5 class="panel-title">
						                                                <a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseOne">已上传的医院代码证照片*</a>
						                                            </h5>
						                                    </div>
						                                    <div id="" class="panel-collapse collapse in">
						                                        <div class="panel-body">
						                                            <c:if test="${hospinfo.hosporgcodecer0!=''}">
																		<a class="fancybox" href="${hospinfo.hosporgcodecer0}" title="图片1">
											                            <img alt="image" src="${hospinfo.hosporgcodecer0}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
																	<c:if test="${hospinfo.hosporgcodecer1!=''}">
												                        <a class="fancybox" href="${hospinfo.hosporgcodecer1}" title="图片2">
												                            <img alt="image" src="${hospinfo.hosporgcodecer1}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
						                                        </div>
						                                    </div>
						                                </div>
						                                <c:if test="${hosplogininfo.hosplogintype==1 }">
															<div class="form-group draggable" id="certify_pic2">
								                                <label>医院代码证*<a><abbr title="注意事项">（当地质量技术监督部门办理组织机构代码证，上传照片时保证代码证号清晰可辨认，模糊可能导致审核不通过！只支持上传一张，不可多选！）</abbr></a></label>
								                                <input name="certify_pic" id="hosporgcodecer" class="file form-control" type="file" multiple=true data-min-file-count="1" data-max-file-count="2"  aria-required="true">
								                            </div>
							                            </c:if>
													</div>
												</div>
												<div class="row">
													<div class="col-sm-12">
														<div class="panel panel-default">
						                                    <div class="panel-heading">
						                                        <h5 class="panel-title">
						                                                <a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseOne">已上传的注册医院执业许可证*</a>
						                                            </h5>
						                                    </div>
						                                    <div id="" class="panel-collapse collapse in">
						                                        <div class="panel-body">
						                                            <c:if test="${hospinfo.hosppraclicense0!=''}">
																		<a class="fancybox" href="${hospinfo.hosppraclicense0}" title="图片1">
											                            	<img alt="image" src="${hospinfo.hosppraclicense0}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
																	<c:if test="${hospinfo.hosppraclicense1!=''}">
												                        <a class="fancybox" href="${hospinfo.hosppraclicense1}" title="图片2">
												                            <img alt="image" src="${hospinfo.hosppraclicense1}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
						                                        </div>
						                                    </div>
						                                </div>
						                                <c:if test="${hosplogininfo.hosplogintype==1 }">
															<div class="form-group draggable" id="certify_pic3">
								                                <label>注册医院执业许可证*<a><abbr title="注意事项">（上传医院的执业许可证照片，上传照片时保证许可证号清晰可辨认，模糊可能导致审核不通过！只支持上传一张，不可多选！）</abbr></a></label>
								                                <input name="certify_pic" id="hosppraclicense" class="file form-control" type="file" multiple=true data-min-file-count="1" data-max-file-count="2"  aria-required="true">
								                            </div>
							                            </c:if>
													</div>
													<div class="col-sm-12">
														
														<div class="panel panel-default">
						                                    <div class="panel-heading">
						                                        <h5 class="panel-title">
						                                                <a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseOne">已上传的注册医院法人证明照片*</a>
						                                            </h5>
						                                    </div>
						                                    <div id="" class="panel-collapse collapse in">
						                                        <div class="panel-body">
						                                            <c:if test="${hospinfo.hosplegalcer0!=''}">
																		<a class="fancybox" href="${hospinfo.hosplegalcer0}" title="图片1">
											                            <img alt="image" src="${hospinfo.hosplegalcer0}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
																	<c:if test="${hospinfo.hosplegalcer1!=''}">
												                        <a class="fancybox" href="${hospinfo.hosplegalcer1}" title="图片2">
												                            <img alt="image" src="${hospinfo.hosplegalcer1}" style="width:320px;height:180px;"/>
												                        </a>
																	</c:if>
						                                        </div>
						                                    </div>
						                                </div>
						                                <c:if test="${hosplogininfo.hosplogintype==1 }">
															<div class="form-group draggable" id="certify_pic4">
								                                <label>注册医院法人证明照片*<a><abbr title="注意事项">（上传注册医院的法人的证明照片，证明材料照片不限，保证法律唯一性即可！只支持上传一张，不可多选！）</abbr></a></label>
								                                <input name="certify_pic" id="hosplegalcer" class="file form-control" type="file" multiple=true data-min-file-count="1" data-max-file-count="2"  aria-required="true">
								                            </div>
							                            </c:if>
													</div>
												</div>
											</div>
											<br/><br/><br/><br/>
											<div class="col-sm-12">
												<div class="form-group draggable">
													<%-- <c:if test="${hospinfo.hosplogintype==1 }">
														<div class="col-sm-12 col-sm-offset-5">
															<button class="btn btn-primary" id="save" type="submit" title="保存后可再次更改，需提交审核后管理员才会审核">保存</button>
															<button class="btn btn-white" id="reset" type="reset">重置</button>
														</div>
													</c:if> --%>
													<c:if test="${hosplogininfo.hosplogintype==1 }">
														<div class="col-sm-12 col-sm-offset-5">
															<button class="btn btn-primary" id="save" type="submit" title="保存后可再次更改，需提交审核后管理员才会审核">保存</button>
															<button class="btn btn-white" id="reset" type="reset">重置</button>
															<button class="btn btn-info" onclick="ExamineSubmit()" type="button" id="TJSH" title="保证资料的完整性，提交后不可更改">提交审核</button>
														</div>
													</c:if>
												</div>
											</div>
										</div>
									</form>
                    			</div>
                			</div>
            			</div>
		           	</div> 
	            </div>
            </div>
            <!-- <div class="footer" style="height:165px;">
				<div class="container">
					<div class="row footer-top">
			            <div class="col-sm-6 col-lg-6">
			                <h4></h4>
			                <p>欢迎您加入，这里有你想要的.</p>
			            </div>
			            <div class="col-sm-6  col-lg-5 col-lg-offset-1">
			                <div class="row about">
			                    <div class="col-xs-3">
			                        <h4>关于</h4>
			                        <ul class="list-unstyled">
			                            <li>
			                                <a href="#">关于我们</a>
			                            </li>
			                        </ul>
			                    </div>
			                    <div class="col-xs-3">
			                        <h4>联系方式</h4>
			                        <ul class="list-unstyled">
			                            <li>
			                                <a title="云梦网官方微博" href="#">新浪微博</a>
			                            </li>
			                            <li>
			                                <a href="#">电子邮件</a>
			                            </li>
			                        </ul>
			                    </div>
			                </div>
			
			            </div>
			        </div>
			        <hr>
			        <div class="row footer-bottom">
			            <ul class="list-inline text-center">
			                <li>Copyright &copy;2017. n 安徽大学——LTT-AH-ZY Software All Rights Reserved.</li>
			            </ul>
			        </div>
    			</div>
			</div> -->
        </div>
    </div>
    <script>
        $(document).ready(function(){
        	$(".fancybox").fancybox({openEffect:"none",closeEffect:"none"})
        	$("#map").click(function(){
        		alert();
        		$("#myModal").modal('show');
                 setTimeout(function() {     //添加延时加载。解决问题
                     var map = new BMap.Map("map_main");
                     var myCity = new BMap.LocalCity();
                     var gc = new BMap.Geocoder();  //初始化，Geocoder类
                     myCity.get(function(res){
                         map.centerAndZoom(res.center,res.level);
                         map.enableScrollWheelZoom(); 		// 开启鼠标滚轮缩放，重要！
                         //向地图中添加缩放控件
                     	var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
                     	map.addControl(ctrl_nav);
                             //向地图中添加缩略图控件
                     	var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1});
                     	map.addControl(ctrl_ove);
                             //向地图中添加比例尺控件
                     	var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
                     	map.addControl(ctrl_sca);
                         /* var old_map = $('#map').val();      //如果已设置过
                         if(old_map.length > '5'){            //打开的时候显示已设置的
                             $("#map_txt").val(old_map);     
                             var oldMap = old_map.split(",");
                             var point = new BMap.Point(oldMap[0],oldMap[1]);    
                             var marker = new BMap.Marker(point);        // 创建标注    
                             map.clearOverlays();
                             map.addOverlay(marker);
                         } */
                         map.addEventListener("click", function(e){
                             var lng_lat = e.point.lng+','+e.point.lat;
                             var point = new BMap.Point(e.point.lng,e.point.lat);    
                             var marker = new BMap.Marker(point);        // 创建标注  
                             gc.getLocation(point,function(rs){
                            	 var addComp = rs.addressComponents;
                            	 var province = addComp.province;//省  
                                 var city = addComp.city;  //市
                                 var area = addComp.district;//区
                                 var street = addComp.street;//街
                                 var streetnumber = addComp.streetNumber;
                                 var Str = province+city+area+street+streetnumber;
                                 $("#map_txt").val(Str);  //加入到设置框
                                 $("#lng").val(e.point.lng);$("#lat").val(e.point.lat);
                                 $("#province").val(province);$("#city").val(city);
                                 $("#area").val(area);$("#other").val(street+streetnumber);
                             })
                             map.clearOverlays();
                             map.addOverlay(marker);
                         });
                     });
                 },300);
             });
        	 
        	 /* $.ajax({  //页面首加载医院等级下拉框数据
                 type: "post",  
                 url: "${pageContext.request.contextPath}/Main/doctor/getHospitalLevel.action",
         		 async: true,
                 success: function (data) {
                 	var datalist = data.list;
                     for (var i = 0; i < datalist.length; i++) {  
                         $('#hosplevel').append("<option value='" + datalist[i].hosplevelname + "' >" + datalist[i].hosplevelname + "</option>");  
                     }  
                 },  
                 error: function () {  
                     $.alert("加载一级部门失败!!!");  
                 }  
             }); */
        });
      //设置经纬度
        function setMapValue(){
            if($("#map_txt").val()==""){
            	$.alert('你还没选择相应的坐标点!');
            	return false;
            }
            $("#map").val($("#map_txt").val());
            $("#lng1").val($("#lng").val());$("#lat1").val($("#lat").val());
            $("#province1").val($("#province").val());$("#city1").val($("#city").val());
            $("#area1").val($("#area").val());$("#other1").val($("#other").val());
            //$('#myModal').modal('hide')
        }
        $("#hospregdocquacer").fileinput({
    		showUpload: true,
    		allowedFileExtensions: ["jpg", "png"], //接收的文件后缀
    		enctype:'multipart/form-data',
    		uploadExtraData:{"type": 4},
    		uploadUrl:"${pageContext.request.contextPath}/Main/NoneRegisterMain/fileupload.action", //上传的地址
    		uploadAsync:true,
    	}).on('fileuploaded', function(event, data, previewId, index){
    		//$("#hospregdocquacer").hide().parent().hide();
            //$('.fileinput-upload').hide();
            var number = Number(index)+1;
    		$.alert("第"+number+"张:code="+data.response.code+"&msg="+data.response.flag);
    	})
    	$("#hosporgcodecer").fileinput({
    		showUpload: true,
    		allowedFileExtensions: ["jpg", "png"], //接收的文件后缀
    		enctype:'multipart/form-data',
    		uploadExtraData:{"type": 1},
    		uploadUrl:"${pageContext.request.contextPath}/Main/NoneRegisterMain/fileupload.action", //上传的地址
    		uploadAsync:true,
    	}).on('fileuploaded', function(event, data, previewId, index){
    		//$("#hosporgcodecer").hide().parent().hide();
            //$('.fileinput-upload').hide();
    		var number = Number(index)+1;
    		$.alert("第"+number+"张"+data.response.flag);
    	});
    	$("#hosppraclicense").fileinput({
    		showUpload: true,
    		allowedFileExtensions: ["jpg", "png"], //接收的文件后缀
    		enctype:'multipart/form-data',
    		uploadExtraData:{"type": 2},
    		uploadUrl:"${pageContext.request.contextPath}/Main/NoneRegisterMain/fileupload.action", //上传的地址
    		uploadAsync:true,
    	}).on('fileuploaded', function(event, data, previewId, index){
    		//$("#hosppraclicense").hide().parent().hide();
            //$('.fileinput-upload').hide();
    		var number = Number(index)+1;
    		$.alert("第"+number+"张"+data.response.flag);
    	});
    	$("#hosplegalcer").fileinput({
    		showUpload: true,
    		allowedFileExtensions: ["jpg", "png"], //接收的文件后缀
    		enctype:'multipart/form-data',
    		uploadExtraData:{"type": 3},
    		uploadUrl:"${pageContext.request.contextPath}/Main/NoneRegisterMain/fileupload.action", //上传的地址
    		uploadAsync:true,
    	}).on('fileuploaded', function(event, data, previewId, index){
    		//$("#hosplegalcer").hide().parent().hide();
            //$('.fileinput-upload').hide();
    		var number = Number(index)+1;
    		$.alert("第"+number+"张"+data.response.flag);
    	});
    	
    	function ExamineSubmit(){
    		
     	   $.confirm({
 	   		    title: '提示!',
 	   		    content: '是否确认提交审核？提交审核后不可再更改详细信息！',
 	   		    type: 'blue',
 	   		    typeAnimated: true,
 	   		    buttons: {
 	   		    	确定: function () {
 	   		    		$("#TJSH").html('<i class="fa fa-spinner fa-spin"></i>处理中...');
 	       				$("#TJSH").prop("disabled",true);
 	       				$("#save").prop("disabled",true);
 	       				$("#reset").prop("disabled",true);
 	       				$("#certify_pic1").hide();$("#certify_pic2").hide();
 	       				$("#certify_pic3").hide();$("#certify_pic4").hide();
 	   		    		//向服务器发送医院确认提交审核操作！
 	   		        	$.ajax({
 			    		   type:'post',
 			    		   url:"${pageContext.request.contextPath}/Main/NoneRegisterMain/ExamineSubmit.action",
 			    		   async: true,
 			    		   success:function(data){
 			    			   $.alert(data.msg);
 			    			   if(data.code=="100"){
 			    				 $("#TJSH").prop("disabled",true);
 			    				 $("#TJSH").hide();
 			    				 $("#save").prop("disabled",true);
 			    				 $("#save").hide();
 			    				 $("#reset").prop("disabled",true);
 			    				 $("#reset").hide();
 			    				 $("#SHZTZ").html('等待审核');
 			    			   }else{
 			    					$("#TJSH").prop("disabled",false);
 			    		    		$("#save").prop("disabled",false);
 			    		    		$("#reset").prop("disabled",false);
 			    		    		$("#TJSH").html('提交审核');
 			    			   }
 			    		   },
 			    		   error:function(request){
 			    			   $.alert("连接失败，检查网络！")
 			    		   }
 			    	   })
 	   		    	},
 	   				取消: function () {},
 	   		    }	
    		});
        }
    </script>
</body>
</html>